package com.itheima.manager;

import com.itheima.domain.OmsOrderReturnReason;
import com.itheima.service.db.OmsOrderReturnReasonService;
import com.itheima.util.R;
import com.itheima.vo.PageBeanVo;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class OmsOrderReturnReasonManager {
    @DubboReference
    private OmsOrderReturnReasonService omsOrderReturnReasonService;

    // 分页查询 退货原因
    public PageBeanVo getPage(Integer pageNum, Integer pageSize) {
        return omsOrderReturnReasonService.getPage(pageNum,pageSize);
    }

    public R save(OmsOrderReturnReason omsOrderReturnReason) {
        return omsOrderReturnReasonService.save(omsOrderReturnReason);

    }

    public void delete(List<Long> ids) {
        omsOrderReturnReasonService.delete(ids);
    }

    public void updateStatus(List<Long> ids, Integer status) {
        omsOrderReturnReasonService.updateStatus(ids,status);
    }

    public OmsOrderReturnReason findById(Long id) {
        return omsOrderReturnReasonService.findById(id);
    }

    public void update(Long id, OmsOrderReturnReason omsOrderReturnReason) {
        omsOrderReturnReasonService.update(id,omsOrderReturnReason);
    }
}
